GtkMenuButton: Avoid direct button access
authorMatthias Clasen <mclasen@redhat.com>
Mon, 15 Jun 2015 22:54:13 +0000 (18:54 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 15 Jun 2015 22:54:13 +0000 (18:54 -0400)
commitf99375f91ed3e785d2e2bb0bb398f84202f71fed
tree74f871b73b14e8d8782ad08752c6f88a000f5e24
parent9fc19b5a26e34568c46b90f7cb7357a2898e78b0
GtkMenuButton: Avoid direct button access

We were getting ourselves in trouble by casting touch events
to GdkEventButton and poking directly at their internals. Instead,
use GdkEvent API to get what we need.

This fixes a crash when using the gear menu in epiphany with
touch. The same crash also occurred in testmenubutton.
gtk/gtkmenubutton.c